package com.sjy.project.ent.yearSta.service.impl;

import java.util.List;
import com.sjy.common.utils.DateUtils;

import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sjy.project.ent.yearSta.mapper.EntKpiYearStaMapper;
import com.sjy.project.ent.yearSta.domain.EntKpiYearSta;
import com.sjy.project.ent.yearSta.service.IEntKpiYearStaService;
import com.sjy.common.utils.text.Convert;

/**
 * 工业企业绩效综合评价Service业务层处理
 * 
 * @author ljb
 * @date 2022-06-05
 */
@Service
public class EntKpiYearStaServiceImpl implements IEntKpiYearStaService 
{
    @Autowired
    private EntKpiYearStaMapper entKpiYearStaMapper;

    /**
     * 查询工业企业绩效综合评价
     * 
     * @param id 工业企业绩效综合评价主键
     * @return 工业企业绩效综合评价
     */
    @Override
    public EntKpiYearSta selectEntKpiYearStaById(Long id)
    {
        return entKpiYearStaMapper.selectEntKpiYearStaById(id);
    }

    /**
     * 查询统代跟年份查询详情
     * 
     * @param id 工业企业绩效综合评价主键
     * @return 工业企业绩效综合评价
     */
    public EntKpiYearSta getByCreditCodeAndYear(String creditCode,Integer dataYear) {
    	return entKpiYearStaMapper.getByCreditCodeAndYear(creditCode, dataYear);
    }
    /**
     * 通过社会统一代码查询企业档案信息
     * @param creditCode
     * @return
     */
    public EntKpiYearSta selectEntKpiYearStaByCreditCode(String creditCode,Integer dataYear) {
    	return entKpiYearStaMapper.selectEntKpiYearStaByCreditCode(creditCode, dataYear);
    }
    /**
     * 查询工业企业绩效综合评价列表
     * 
     * @param entKpiYearSta 工业企业绩效综合评价
     * @return 工业企业绩效综合评价
     */
    @Override
    public List<EntKpiYearSta> selectEntKpiYearStaList(EntKpiYearSta entKpiYearSta)
    {
        return entKpiYearStaMapper.selectEntKpiYearStaList(entKpiYearSta);
    }

    /**
     * 新增工业企业绩效综合评价
     * 
     * @param entKpiYearSta 工业企业绩效综合评价
     * @return 结果
     */
    @Override
    public int insertEntKpiYearSta(EntKpiYearSta entKpiYearSta)
    {
        entKpiYearSta.setCreateTime(DateUtils.getNowDate());
        return entKpiYearStaMapper.insertEntKpiYearSta(entKpiYearSta);
    }

    /**
     * 修改工业企业绩效综合评价
     * 
     * @param entKpiYearSta 工业企业绩效综合评价
     * @return 结果
     */
    @Override
    public int updateEntKpiYearSta(EntKpiYearSta entKpiYearSta)
    {
        entKpiYearSta.setUpdateTime(DateUtils.getNowDate());
        return entKpiYearStaMapper.updateEntKpiYearSta(entKpiYearSta);
    }

    /**
     * 批量删除工业企业绩效综合评价
     * 
     * @param ids 需要删除的工业企业绩效综合评价主键
     * @return 结果
     */
    @Override
    public int deleteEntKpiYearStaByIds(String ids)
    {
        return entKpiYearStaMapper.deleteEntKpiYearStaByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除工业企业绩效综合评价信息
     * 
     * @param id 工业企业绩效综合评价主键
     * @return 结果
     */
    @Override
    public int deleteEntKpiYearStaById(Long id)
    {
        return entKpiYearStaMapper.deleteEntKpiYearStaById(id);
    }
}
